package com.aaa.pay.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

/**
 * fileName:PayDao
 * description:
 * author:lk
 * createTime:2020/3/20 9:31
 * version:1.0.0
 */
public interface PayDao {

    /**
     * 根据member充值余额
     * @return
     */
    @Update("update ums_member set balance=balance+#{much} where id=#{memberId}")
    int payBymemberId(Map map);

    /**
     * 向用户的消费记录中添加消费信息
     * @param map
     * @return
     */
    @Insert("insert into ums_member_expenditure_history (member_id,money,type) values (#{memberId},#{much},#{type})")
    int expenditureLog(Map map);
}
